Integrand size = 28, antiderivative size = 343 \[ \int \frac {(e+f x)^2 \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {2 i (e+f x)^2}{3 a d}-\frac {2 i f (e+f x) \arctan \left (e^{i (c+d x)}\right )}{3 a d^2}+\frac {4 f (e+f x) \log \left (1+e^{2 i (c+d x)}\right )}{3 a d^2}+\frac {i f^2 \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{3 a d^3}-\frac {i f^2 \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{3 a d^3}-\frac {2 i f^2 \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right )}{3 a d^3}-\frac {f^2 \sec (c+d x)}{3 a d^3}-\frac {f (e+f x) \sec ^2(c+d x)}{3 a d^2}-\frac {(e+f x)^2 \sec ^3(c+d x)}{3 a d}+\frac {f^2 \tan (c+d x)}{3 a d^3}+\frac {2 (e+f x)^2 \tan (c+d x)}{3 a d}+\frac {f (e+f x) \sec (c+d x) \tan (c+d x)}{3 a d^2}+\frac {(e+f x)^2 \sec ^2(c+d x) \tan (c+d x)}{3 a d} \]
-2/3*I*(f*x+e)^2/a/d-2/3*I*f*(f*x+e)*arctan(exp(I*(d*x+c)))/a/d^2+4/3*f*(f *x+e)*ln(1+exp(2*I*(d*x+c)))/a/d^2+1/3*I*f^2*polylog(2,-I*exp(I*(d*x+c)))/ a/d^3-1/3*I*f^2*polylog(2,I*exp(I*(d*x+c)))/a/d^3-2/3*I*f^2*polylog(2,-exp (2*I*(d*x+c)))/a/d^3-1/3*f^2*sec(d*x+c)/a/d^3-1/3*f*(f*x+e)*sec(d*x+c)^2/a /d^2-1/3*(f*x+e)^2*sec(d*x+c)^3/a/d+1/3*f^2*tan(d*x+c)/a/d^3+2/3*(f*x+e)^2 *tan(d*x+c)/a/d+1/3*f*(f*x+e)*sec(d*x+c)*tan(d*x+c)/a/d^2+1/3*(f*x+e)^2*se c(d*x+c)^2*tan(d*x+c)/a/d
Time = 5.07 (sec) , antiderivative size = 637, normalized size of antiderivative = 1.86 \[ \int \frac {(e+f x)^2 \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\frac {12 d^2 f \left (\frac {f \operatorname {PolyLog}(2,i \cos (c+d x)+\sin (c+d x)) (\cos (c)-i (-1+\sin (c)))}{d^2}+\frac {(e+f x) \log (1-i \cos (c+d x)-\sin (c+d x)) (1-i \cos (c)-\sin (c))}{d}+\frac {(e+f x)^2 (\cos (c)-i \sin (c))}{2 f}\right ) (\cos (c)+i \sin (c))}{\cos (c)+i (-1+\sin (c))}-\frac {20 d^2 f (\cos (c)+i \sin (c)) \left (\frac {(e+f x)^2 (\cos (c)-i \sin (c))}{2 f}-\frac {(e+f x) \log (1+i \cos (c+d x)+\sin (c+d x)) (1+i \cos (c)+\sin (c))}{d}+\frac {f \operatorname {PolyLog}(2,-i \cos (c+d x)-\sin (c+d x)) (\cos (c)-i (1+\sin (c)))}{d^2}\right )}{\cos (c)+i (1+\sin (c))}+\frac {-2 f^2 \cos (c)-2 d f (e+f x) \cos (d x)+2 d^2 e^2 \cos (c+d x)+4 f^2 \cos (c+d x)+4 d^2 e f x \cos (c+d x)+2 d^2 f^2 x^2 \cos (c+d x)-2 d e f \cos (2 c+d x)-2 d f^2 x \cos (2 c+d x)-4 d^2 e^2 \cos (c+2 d x)-2 f^2 \cos (c+2 d x)-8 d^2 e f x \cos (c+2 d x)-4 d^2 f^2 x^2 \cos (c+2 d x)+8 d^2 e^2 \sin (d x)+2 f^2 \sin (d x)+16 d^2 e f x \sin (d x)+8 d^2 f^2 x^2 \sin (d x)+d^2 e^2 \sin (2 (c+d x))+2 f^2 \sin (2 (c+d x))+2 d^2 e f x \sin (2 (c+d x))+d^2 f^2 x^2 \sin (2 (c+d x))-2 f^2 \sin (2 c+d x)}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}}{12 a d^3} \]
((12*d^2*f*((f*PolyLog[2, I*Cos[c + d*x] + Sin[c + d*x]]*(Cos[c] - I*(-1 + Sin[c])))/d^2 + ((e + f*x)*Log[1 - I*Cos[c + d*x] - Sin[c + d*x]]*(1 - I* Cos[c] - Sin[c]))/d + ((e + f*x)^2*(Cos[c] - I*Sin[c]))/(2*f))*(Cos[c] + I *Sin[c]))/(Cos[c] + I*(-1 + Sin[c])) - (20*d^2*f*(Cos[c] + I*Sin[c])*(((e + f*x)^2*(Cos[c] - I*Sin[c]))/(2*f) - ((e + f*x)*Log[1 + I*Cos[c + d*x] + Sin[c + d*x]]*(1 + I*Cos[c] + Sin[c]))/d + (f*PolyLog[2, (-I)*Cos[c + d*x] - Sin[c + d*x]]*(Cos[c] - I*(1 + Sin[c])))/d^2))/(Cos[c] + I*(1 + Sin[c]) ) + (-2*f^2*Cos[c] - 2*d*f*(e + f*x)*Cos[d*x] + 2*d^2*e^2*Cos[c + d*x] + 4 *f^2*Cos[c + d*x] + 4*d^2*e*f*x*Cos[c + d*x] + 2*d^2*f^2*x^2*Cos[c + d*x] - 2*d*e*f*Cos[2*c + d*x] - 2*d*f^2*x*Cos[2*c + d*x] - 4*d^2*e^2*Cos[c + 2* d*x] - 2*f^2*Cos[c + 2*d*x] - 8*d^2*e*f*x*Cos[c + 2*d*x] - 4*d^2*f^2*x^2*C os[c + 2*d*x] + 8*d^2*e^2*Sin[d*x] + 2*f^2*Sin[d*x] + 16*d^2*e*f*x*Sin[d*x ] + 8*d^2*f^2*x^2*Sin[d*x] + d^2*e^2*Sin[2*(c + d*x)] + 2*f^2*Sin[2*(c + d *x)] + 2*d^2*e*f*x*Sin[2*(c + d*x)] + d^2*f^2*x^2*Sin[2*(c + d*x)] - 2*f^2 *Sin[2*c + d*x])/((Cos[c/2] - Sin[c/2])*(Cos[c/2] + Sin[c/2])*(Cos[(c + d* x)/2] - Sin[(c + d*x)/2])*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^3))/(12*a* d^3)
Time = 1.79 (sec) , antiderivative size = 326, normalized size of antiderivative = 0.95, number of steps used = 21, number of rules used = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.714, Rules used = {5042, 3042, 4674, 3042, 4254, 24, 4672, 25, 3042, 4202, 2620, 2715, 2838, 4909, 3042, 4673, 3042, 4669, 2715, 2838}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(e+f x)^2 \sec ^2(c+d x)}{a \sin (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 5042 |
\(\displaystyle \frac {\int (e+f x)^2 \sec ^4(c+d x)dx}{a}-\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (e+f x)^2 \csc \left (c+d x+\frac {\pi }{2}\right )^4dx}{a}-\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 4674 |
\(\displaystyle \frac {\frac {f^2 \int \sec ^2(c+d x)dx}{3 d^2}+\frac {2}{3} \int (e+f x)^2 \sec ^2(c+d x)dx-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}-\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {f^2 \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx}{3 d^2}+\frac {2}{3} \int (e+f x)^2 \csc \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}-\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {-\frac {f^2 \int 1d(-\tan (c+d x))}{3 d^3}+\frac {2}{3} \int (e+f x)^2 \csc \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}-\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {2}{3} \int (e+f x)^2 \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+\frac {f^2 \tan (c+d x)}{3 d^3}-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}-\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 4672 |
\(\displaystyle \frac {\frac {2}{3} \left (\frac {2 f \int -((e+f x) \tan (c+d x))dx}{d}+\frac {(e+f x)^2 \tan (c+d x)}{d}\right )+\frac {f^2 \tan (c+d x)}{3 d^3}-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}-\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \int (e+f x) \tan (c+d x)dx}{d}\right )+\frac {f^2 \tan (c+d x)}{3 d^3}-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}-\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \int (e+f x) \tan (c+d x)dx}{d}\right )+\frac {f^2 \tan (c+d x)}{3 d^3}-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}-\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 4202 |
\(\displaystyle -\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}+\frac {\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \int \frac {e^{2 i (c+d x)} (e+f x)}{1+e^{2 i (c+d x)}}dx\right )}{d}\right )+\frac {f^2 \tan (c+d x)}{3 d^3}-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle -\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}+\frac {\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (\frac {i f \int \log \left (1+e^{2 i (c+d x)}\right )dx}{2 d}-\frac {i (e+f x) \log \left (1+e^{2 i (c+d x)}\right )}{2 d}\right )\right )}{d}\right )+\frac {f^2 \tan (c+d x)}{3 d^3}-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle -\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}+\frac {\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (\frac {f \int e^{-2 i (c+d x)} \log \left (1+e^{2 i (c+d x)}\right )de^{2 i (c+d x)}}{4 d^2}-\frac {i (e+f x) \log \left (1+e^{2 i (c+d x)}\right )}{2 d}\right )\right )}{d}\right )+\frac {f^2 \tan (c+d x)}{3 d^3}-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle -\frac {\int (e+f x)^2 \sec ^3(c+d x) \tan (c+d x)dx}{a}+\frac {\frac {f^2 \tan (c+d x)}{3 d^3}+\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (-\frac {f \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right )}{4 d^2}-\frac {i (e+f x) \log \left (1+e^{2 i (c+d x)}\right )}{2 d}\right )\right )}{d}\right )-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}\) |
\(\Big \downarrow \) 4909 |
\(\displaystyle -\frac {\frac {(e+f x)^2 \sec ^3(c+d x)}{3 d}-\frac {2 f \int (e+f x) \sec ^3(c+d x)dx}{3 d}}{a}+\frac {\frac {f^2 \tan (c+d x)}{3 d^3}+\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (-\frac {f \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right )}{4 d^2}-\frac {i (e+f x) \log \left (1+e^{2 i (c+d x)}\right )}{2 d}\right )\right )}{d}\right )-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {(e+f x)^2 \sec ^3(c+d x)}{3 d}-\frac {2 f \int (e+f x) \csc \left (c+d x+\frac {\pi }{2}\right )^3dx}{3 d}}{a}+\frac {\frac {f^2 \tan (c+d x)}{3 d^3}+\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (-\frac {f \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right )}{4 d^2}-\frac {i (e+f x) \log \left (1+e^{2 i (c+d x)}\right )}{2 d}\right )\right )}{d}\right )-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}\) |
\(\Big \downarrow \) 4673 |
\(\displaystyle -\frac {\frac {(e+f x)^2 \sec ^3(c+d x)}{3 d}-\frac {2 f \left (\frac {1}{2} \int (e+f x) \sec (c+d x)dx-\frac {f \sec (c+d x)}{2 d^2}+\frac {(e+f x) \tan (c+d x) \sec (c+d x)}{2 d}\right )}{3 d}}{a}+\frac {\frac {f^2 \tan (c+d x)}{3 d^3}+\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (-\frac {f \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right )}{4 d^2}-\frac {i (e+f x) \log \left (1+e^{2 i (c+d x)}\right )}{2 d}\right )\right )}{d}\right )-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {(e+f x)^2 \sec ^3(c+d x)}{3 d}-\frac {2 f \left (\frac {1}{2} \int (e+f x) \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {f \sec (c+d x)}{2 d^2}+\frac {(e+f x) \tan (c+d x) \sec (c+d x)}{2 d}\right )}{3 d}}{a}+\frac {\frac {f^2 \tan (c+d x)}{3 d^3}+\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (-\frac {f \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right )}{4 d^2}-\frac {i (e+f x) \log \left (1+e^{2 i (c+d x)}\right )}{2 d}\right )\right )}{d}\right )-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}\) |
\(\Big \downarrow \) 4669 |
\(\displaystyle \frac {\frac {f^2 \tan (c+d x)}{3 d^3}+\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (-\frac {f \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right )}{4 d^2}-\frac {i (e+f x) \log \left (1+e^{2 i (c+d x)}\right )}{2 d}\right )\right )}{d}\right )-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}-\frac {\frac {(e+f x)^2 \sec ^3(c+d x)}{3 d}-\frac {2 f \left (\frac {1}{2} \left (-\frac {f \int \log \left (1-i e^{i (c+d x)}\right )dx}{d}+\frac {f \int \log \left (1+i e^{i (c+d x)}\right )dx}{d}-\frac {2 i (e+f x) \arctan \left (e^{i (c+d x)}\right )}{d}\right )-\frac {f \sec (c+d x)}{2 d^2}+\frac {(e+f x) \tan (c+d x) \sec (c+d x)}{2 d}\right )}{3 d}}{a}\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle \frac {\frac {f^2 \tan (c+d x)}{3 d^3}+\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (-\frac {f \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right )}{4 d^2}-\frac {i (e+f x) \log \left (1+e^{2 i (c+d x)}\right )}{2 d}\right )\right )}{d}\right )-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}-\frac {\frac {(e+f x)^2 \sec ^3(c+d x)}{3 d}-\frac {2 f \left (\frac {1}{2} \left (\frac {i f \int e^{-i (c+d x)} \log \left (1-i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}-\frac {i f \int e^{-i (c+d x)} \log \left (1+i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}-\frac {2 i (e+f x) \arctan \left (e^{i (c+d x)}\right )}{d}\right )-\frac {f \sec (c+d x)}{2 d^2}+\frac {(e+f x) \tan (c+d x) \sec (c+d x)}{2 d}\right )}{3 d}}{a}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle \frac {\frac {f^2 \tan (c+d x)}{3 d^3}+\frac {2}{3} \left (\frac {(e+f x)^2 \tan (c+d x)}{d}-\frac {2 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (-\frac {f \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right )}{4 d^2}-\frac {i (e+f x) \log \left (1+e^{2 i (c+d x)}\right )}{2 d}\right )\right )}{d}\right )-\frac {f (e+f x) \sec ^2(c+d x)}{3 d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec ^2(c+d x)}{3 d}}{a}-\frac {\frac {(e+f x)^2 \sec ^3(c+d x)}{3 d}-\frac {2 f \left (\frac {1}{2} \left (-\frac {2 i (e+f x) \arctan \left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{d^2}\right )-\frac {f \sec (c+d x)}{2 d^2}+\frac {(e+f x) \tan (c+d x) \sec (c+d x)}{2 d}\right )}{3 d}}{a}\) |
(-1/3*(f*(e + f*x)*Sec[c + d*x]^2)/d^2 + (f^2*Tan[c + d*x])/(3*d^3) + ((e + f*x)^2*Sec[c + d*x]^2*Tan[c + d*x])/(3*d) + (2*((-2*f*(((I/2)*(e + f*x)^ 2)/f - (2*I)*(((-1/2*I)*(e + f*x)*Log[1 + E^((2*I)*(c + d*x))])/d - (f*Pol yLog[2, -E^((2*I)*(c + d*x))])/(4*d^2))))/d + ((e + f*x)^2*Tan[c + d*x])/d ))/3)/a - (((e + f*x)^2*Sec[c + d*x]^3)/(3*d) - (2*f*((((-2*I)*(e + f*x)*A rcTan[E^(I*(c + d*x))])/d + (I*f*PolyLog[2, (-I)*E^(I*(c + d*x))])/d^2 - ( I*f*PolyLog[2, I*E^(I*(c + d*x))])/d^2)/2 - (f*Sec[c + d*x])/(2*d^2) + ((e + f*x)*Sec[c + d*x]*Tan[c + d*x])/(2*d)))/(3*d))/a
3.3.76.3.1 Defintions of rubi rules used
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ ((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp [((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si mp[d*(m/(b*f*g*n*Log[F])) Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x )))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Simp[1/(d*e*n*Log[F]) Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) ))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[I *((c + d*x)^(m + 1)/(d*(m + 1))), x] - Simp[2*I Int[(c + d*x)^m*(E^(2*I*( e + f*x))/(1 + E^(2*I*(e + f*x)))), x], x] /; FreeQ[{c, d, e, f}, x] && IGt Q[m, 0]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol ] :> Simp[-2*(c + d*x)^m*(ArcTanh[E^(I*k*Pi)*E^(I*(e + f*x))]/f), x] + (-Si mp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))], x], x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x ))], x], x]) /; FreeQ[{c, d, e, f}, x] && IntegerQ[2*k] && IGtQ[m, 0]
Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp [(-(c + d*x)^m)*(Cot[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1) *Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(-b^2)*(c + d*x)*Cot[e + f*x]*((b*Csc[e + f*x])^(n - 2)/(f*(n - 1))), x] + (-Simp[b^2*d*((b*Csc[e + f*x])^(n - 2)/(f^2*(n - 1)*(n - 2))), x] + S imp[b^2*((n - 2)/(n - 1)) Int[(c + d*x)*(b*Csc[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && NeQ[n, 2]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_))^(m_), x_Symbo l] :> Simp[(-b^2)*(c + d*x)^m*Cot[e + f*x]*((b*Csc[e + f*x])^(n - 2)/(f*(n - 1))), x] + (-Simp[b^2*d*m*(c + d*x)^(m - 1)*((b*Csc[e + f*x])^(n - 2)/(f^ 2*(n - 1)*(n - 2))), x] + Simp[b^2*d^2*m*((m - 1)/(f^2*(n - 1)*(n - 2))) Int[(c + d*x)^(m - 2)*(b*Csc[e + f*x])^(n - 2), x], x] + Simp[b^2*((n - 2)/ (n - 1)) Int[(c + d*x)^m*(b*Csc[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c , d, e, f}, x] && GtQ[n, 1] && NeQ[n, 2] && GtQ[m, 1]
Int[((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(n_.)*Tan[(a_.) + (b _.)*(x_)]^(p_.), x_Symbol] :> Simp[(c + d*x)^m*(Sec[a + b*x]^n/(b*n)), x] - Simp[d*(m/(b*n)) Int[(c + d*x)^(m - 1)*Sec[a + b*x]^n, x], x] /; FreeQ[{ a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]
Int[(((e_.) + (f_.)*(x_))^(m_.)*Sec[(c_.) + (d_.)*(x_)]^(n_.))/((a_) + (b_. )*Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[1/a Int[(e + f*x)^m*Sec[c + d*x]^(n + 2), x], x] - Simp[1/b Int[(e + f*x)^m*Sec[c + d*x]^(n + 1)*Tan [c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && IGtQ[m, 0] && EqQ[a ^2 - b^2, 0]
Time = 0.58 (sec) , antiderivative size = 568, normalized size of antiderivative = 1.66
method | result | size |
risch | \(-\frac {2 \left (4 \,{\mathrm e}^{i \left (d x +c \right )} d^{2} f^{2} x^{2}+2 i d^{2} x^{2} f^{2}+f^{2} {\mathrm e}^{3 i \left (d x +c \right )}+i f^{2}+i f^{2} {\mathrm e}^{2 i \left (d x +c \right )}+8 \,{\mathrm e}^{i \left (d x +c \right )} d^{2} e f x +i d e f \,{\mathrm e}^{i \left (d x +c \right )}+i d \,f^{2} x \,{\mathrm e}^{3 i \left (d x +c \right )}+i d e f \,{\mathrm e}^{3 i \left (d x +c \right )}+4 i d^{2} e f x +i d \,f^{2} x \,{\mathrm e}^{i \left (d x +c \right )}+f^{2} {\mathrm e}^{i \left (d x +c \right )}+4 \,{\mathrm e}^{i \left (d x +c \right )} d^{2} e^{2}+2 i d^{2} e^{2}\right )}{3 \left (-i+{\mathrm e}^{i \left (d x +c \right )}\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{3} d^{3} a}+\frac {4 f e \ln \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )}{3 a \,d^{2}}-\frac {4 f^{2} c \ln \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )}{3 a \,d^{3}}-\frac {5 i f^{2} \operatorname {Li}_{2}\left (i {\mathrm e}^{i \left (d x +c \right )}\right )}{3 a \,d^{3}}+\frac {5 f^{2} \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) c}{3 a \,d^{3}}+\frac {8 f^{2} c \ln \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{3 a \,d^{3}}+\frac {2 i f^{2} c \arctan \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{3 a \,d^{3}}-\frac {4 i f^{2} x^{2}}{3 a d}-\frac {4 i f^{2} c^{2}}{3 a \,d^{3}}+\frac {f^{2} \ln \left (1+i {\mathrm e}^{i \left (d x +c \right )}\right ) c}{d^{3} a}-\frac {8 f e \ln \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{3 a \,d^{2}}-\frac {i f^{2} \operatorname {Li}_{2}\left (-i {\mathrm e}^{i \left (d x +c \right )}\right )}{d^{3} a}+\frac {f^{2} \ln \left (1+i {\mathrm e}^{i \left (d x +c \right )}\right ) x}{d^{2} a}+\frac {5 f^{2} \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) x}{3 a \,d^{2}}-\frac {8 i c \,f^{2} x}{3 d^{2} a}-\frac {2 i e f \arctan \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{3 a \,d^{2}}\) | \(568\) |
-2/3*(4*exp(I*(d*x+c))*d^2*f^2*x^2+2*I*d^2*x^2*f^2+f^2*exp(3*I*(d*x+c))+I* f^2+I*f^2*exp(2*I*(d*x+c))+8*exp(I*(d*x+c))*d^2*e*f*x+I*d*e*f*exp(I*(d*x+c ))+I*d*f^2*x*exp(3*I*(d*x+c))+I*d*e*f*exp(3*I*(d*x+c))+4*I*d^2*e*f*x+I*d*f ^2*x*exp(I*(d*x+c))+f^2*exp(I*(d*x+c))+4*exp(I*(d*x+c))*d^2*e^2+2*I*d^2*e^ 2)/(-I+exp(I*(d*x+c)))/(exp(I*(d*x+c))+I)^3/d^3/a+4/3/d^2/a*e*f*ln(1+exp(2 *I*(d*x+c)))-4/3/d^3/a*f^2*c*ln(1+exp(2*I*(d*x+c)))-5/3*I/d^3/a*f^2*polylo g(2,I*exp(I*(d*x+c)))+5/3/d^3/a*f^2*ln(1-I*exp(I*(d*x+c)))*c+8/3/d^3/a*f^2 *c*ln(exp(I*(d*x+c)))+2/3*I/d^3/a*f^2*c*arctan(exp(I*(d*x+c)))-4/3*I/d/a*f ^2*x^2-4/3*I/d^3/a*f^2*c^2+1/d^3/a*f^2*ln(1+I*exp(I*(d*x+c)))*c-8/3/d^2/a* e*f*ln(exp(I*(d*x+c)))-I/d^3/a*f^2*polylog(2,-I*exp(I*(d*x+c)))+1/d^2/a*f^ 2*ln(1+I*exp(I*(d*x+c)))*x+5/3/d^2/a*f^2*ln(1-I*exp(I*(d*x+c)))*x-8/3*I/d^ 2/a*c*f^2*x-2/3*I/d^2/a*e*f*arctan(exp(I*(d*x+c)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 859 vs. \(2 (290) = 580\).
Time = 0.31 (sec) , antiderivative size = 859, normalized size of antiderivative = 2.50 \[ \int \frac {(e+f x)^2 \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\text {Too large to display} \]
1/6*(2*d^2*f^2*x^2 + 4*d^2*e*f*x + 2*d^2*e^2 - 2*(2*d^2*f^2*x^2 + 4*d^2*e* f*x + 2*d^2*e^2 + f^2)*cos(d*x + c)^2 - 2*(d*f^2*x + d*e*f)*cos(d*x + c) - 3*(-I*f^2*cos(d*x + c)*sin(d*x + c) - I*f^2*cos(d*x + c))*dilog(I*cos(d*x + c) + sin(d*x + c)) - 5*(I*f^2*cos(d*x + c)*sin(d*x + c) + I*f^2*cos(d*x + c))*dilog(I*cos(d*x + c) - sin(d*x + c)) - 3*(I*f^2*cos(d*x + c)*sin(d* x + c) + I*f^2*cos(d*x + c))*dilog(-I*cos(d*x + c) + sin(d*x + c)) - 5*(-I *f^2*cos(d*x + c)*sin(d*x + c) - I*f^2*cos(d*x + c))*dilog(-I*cos(d*x + c) - sin(d*x + c)) + 5*((d*e*f - c*f^2)*cos(d*x + c)*sin(d*x + c) + (d*e*f - c*f^2)*cos(d*x + c))*log(cos(d*x + c) + I*sin(d*x + c) + I) + 3*((d*e*f - c*f^2)*cos(d*x + c)*sin(d*x + c) + (d*e*f - c*f^2)*cos(d*x + c))*log(cos( d*x + c) - I*sin(d*x + c) + I) + 5*((d*f^2*x + c*f^2)*cos(d*x + c)*sin(d*x + c) + (d*f^2*x + c*f^2)*cos(d*x + c))*log(I*cos(d*x + c) + sin(d*x + c) + 1) + 3*((d*f^2*x + c*f^2)*cos(d*x + c)*sin(d*x + c) + (d*f^2*x + c*f^2)* cos(d*x + c))*log(I*cos(d*x + c) - sin(d*x + c) + 1) + 5*((d*f^2*x + c*f^2 )*cos(d*x + c)*sin(d*x + c) + (d*f^2*x + c*f^2)*cos(d*x + c))*log(-I*cos(d *x + c) + sin(d*x + c) + 1) + 3*((d*f^2*x + c*f^2)*cos(d*x + c)*sin(d*x + c) + (d*f^2*x + c*f^2)*cos(d*x + c))*log(-I*cos(d*x + c) - sin(d*x + c) + 1) + 5*((d*e*f - c*f^2)*cos(d*x + c)*sin(d*x + c) + (d*e*f - c*f^2)*cos(d* x + c))*log(-cos(d*x + c) + I*sin(d*x + c) + I) + 3*((d*e*f - c*f^2)*cos(d *x + c)*sin(d*x + c) + (d*e*f - c*f^2)*cos(d*x + c))*log(-cos(d*x + c) ...
\[ \int \frac {(e+f x)^2 \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\int \frac {e^{2} \sec ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx + \int \frac {f^{2} x^{2} \sec ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx + \int \frac {2 e f x \sec ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \]
(Integral(e**2*sec(c + d*x)**2/(sin(c + d*x) + 1), x) + Integral(f**2*x**2 *sec(c + d*x)**2/(sin(c + d*x) + 1), x) + Integral(2*e*f*x*sec(c + d*x)**2 /(sin(c + d*x) + 1), x))/a
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1328 vs. \(2 (290) = 580\).
Time = 0.57 (sec) , antiderivative size = 1328, normalized size of antiderivative = 3.87 \[ \int \frac {(e+f x)^2 \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\text {Too large to display} \]
-(8*d^2*e^2 + 4*f^2*cos(2*d*x + 2*c) + 4*I*f^2*sin(2*d*x + 2*c) + 4*f^2 - 10*(d*e*f*cos(4*d*x + 4*c) + 2*I*d*e*f*cos(3*d*x + 3*c) + 2*I*d*e*f*cos(d* x + c) + I*d*e*f*sin(4*d*x + 4*c) - 2*d*e*f*sin(3*d*x + 3*c) - 2*d*e*f*sin (d*x + c) - d*e*f)*arctan2(sin(d*x + c) + 1, cos(d*x + c)) - 6*(d*e*f*cos( 4*d*x + 4*c) + 2*I*d*e*f*cos(3*d*x + 3*c) + 2*I*d*e*f*cos(d*x + c) + I*d*e *f*sin(4*d*x + 4*c) - 2*d*e*f*sin(3*d*x + 3*c) - 2*d*e*f*sin(d*x + c) - d* e*f)*arctan2(sin(d*x + c) - 1, cos(d*x + c)) + 10*(d*f^2*x*cos(4*d*x + 4*c ) + 2*I*d*f^2*x*cos(3*d*x + 3*c) + 2*I*d*f^2*x*cos(d*x + c) + I*d*f^2*x*si n(4*d*x + 4*c) - 2*d*f^2*x*sin(3*d*x + 3*c) - 2*d*f^2*x*sin(d*x + c) - d*f ^2*x)*arctan2(cos(d*x + c), sin(d*x + c) + 1) - 6*(d*f^2*x*cos(4*d*x + 4*c ) + 2*I*d*f^2*x*cos(3*d*x + 3*c) + 2*I*d*f^2*x*cos(d*x + c) + I*d*f^2*x*si n(4*d*x + 4*c) - 2*d*f^2*x*sin(3*d*x + 3*c) - 2*d*f^2*x*sin(d*x + c) - d*f ^2*x)*arctan2(cos(d*x + c), -sin(d*x + c) + 1) + 8*(d^2*f^2*x^2 + 2*d^2*e* f*x)*cos(4*d*x + 4*c) + 4*(4*I*d^2*f^2*x^2 + d*e*f - I*f^2 + (8*I*d^2*e*f + d*f^2)*x)*cos(3*d*x + 3*c) + 4*(-4*I*d^2*e^2 + d*f^2*x + d*e*f - I*f^2)* cos(d*x + c) + 10*(f^2*cos(4*d*x + 4*c) + 2*I*f^2*cos(3*d*x + 3*c) + 2*I*f ^2*cos(d*x + c) + I*f^2*sin(4*d*x + 4*c) - 2*f^2*sin(3*d*x + 3*c) - 2*f^2* sin(d*x + c) - f^2)*dilog(I*e^(I*d*x + I*c)) + 6*(f^2*cos(4*d*x + 4*c) + 2 *I*f^2*cos(3*d*x + 3*c) + 2*I*f^2*cos(d*x + c) + I*f^2*sin(4*d*x + 4*c) - 2*f^2*sin(3*d*x + 3*c) - 2*f^2*sin(d*x + c) - f^2)*dilog(-I*e^(I*d*x + ...
\[ \int \frac {(e+f x)^2 \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )}^{2} \sec \left (d x + c\right )^{2}}{a \sin \left (d x + c\right ) + a} \,d x } \]
Timed out. \[ \int \frac {(e+f x)^2 \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\text {Hanged} \]